package response

import (
	"github.com/valyala/fasthttp"
	"io"
)

type FastHttpResponse struct {
	response *fasthttp.Response
}

func NewFastHttpResponse(w *fasthttp.Response) ResponseInterface {
	return &FastHttpResponse{
		response: w,
	}
}

func (r *FastHttpResponse) GetIoWriter() io.Writer {
	return r.response.BodyWriter()
}

func (r *FastHttpResponse) HeaderAdd(key string, value string) {
	r.response.Header.Set(key, value)
}

func (r *FastHttpResponse) HeaderSet(key string, value string) {
	r.response.Header.Set(key, value)
}
